import request from 'api/request'

export function addBlog(data) {
  return request({
    url: '/article/add',
    method: 'post',
    data
  })
}

export function updateBlog(data) {
  return request({
    url: '/article/update',
    method: 'post',
    data
  })
}

export function getBlogList(params) {
  return request({
    url: '/article/list',
    method: 'post',
    data: { ...params, source: 'admin' }
  })
}

export function delBlog(id) {
  return request({
    url: '/article/del',
    method: 'get',
    params: id
  })
}
